<!DOCTYPE html>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<script>
    function test()
    {
        var obj = document.querySelector("object");
        var svgdoc = obj.contentDocument;
        var svgroot = svgdoc.documentElement;
        svgroot.currentScale = 0.5;
    }
</script>
<object onload="runAfterLayoutAndPaint(test,true)" data="resources/green-rect.svg" type="image/svg+xml">
</object>
<svg>
    <rect width='100' height='100' fill='green'/>
</svg>
